<template>
	<view>
		<!-- 分享二维码 -->
		<u-popup :show="fxshow" @close="fxclose" mode="center">
			<view class="mainpadding block erwmbjsty">
				<view class="mainpadding2s radius ffffff" style="width: 428rpx;">
					<view class="erwmtu">
						<image src="../static/image/system/ms.png" mode=""></image>
					</view>
					<view class="margin_top2">
						<view class="ershiba xiaohei nofonweight">套餐名称</view>
						<view class="margin_top1 xiaohui ershil nofonweight">
							详情内容详情内容详情内容详情内容详情内容详情内容详情
						</view>
					</view>
				</view>
				<view class="flexbetween margin_top2">
					<view class="xiaolan ershil nofonweight">长按识别图中二维码</view>
					<view class="erwim">
						<image src="../static/image/system/kj.png" mode=""></image>
					</view>
				</view>
			</view>
		</u-popup>
		<!-- 分享弹框 -->
		<u-popup :show="show" @close="close">
			<view>
				<view class="mainpadding xiahuaxian dingwei">
					<view class="sanshier fonweight xiaohei textcenter" @click="show = true">分享到</view>
					<view class="guandys" @click="close">
						<u-icon name="close"></u-icon>
					</view>
					<view class="mainpadding">
						<view class="flexleft ">
							<view class="margin_right6" @click="fxshow = true">
								<view class="weixin marginauto"></view>
								<view class="xiaohei ershiba nofonweight textcenter margin_top1">微信</view>
							</view>
							<view class="flexleft">
								<view class="">
									<view class="pengyouq marginauto"></view>
									<view class="xiaohei ershiba nofonweight textcenter margin_top1">朋友圈</view>
								</view>
							</view>
						</view>

					</view>
				</view>
			</view>
		</u-popup>
		<!-- 轮播图 -->
		<view class="dingwei">
			<u-swiper :list="list1" height="290px"></u-swiper>
			<view class="flexleft icowz">
				<u-icon name="share-square" size="26" color="#f5f5f5" @click="show = true"></u-icon>
			</view>
		</view>
		<!-- 场地信息 -->
		<view class="mainpadding ffffff">
			<view class="sanshier xiaohei fonweight">篮球场地名称</view>
			<view class="margin_top1 xiaohui ershiba nofonweight">
				详情内容详情内容详情内容详情内容详情内容详情内容详情内容详情内容详情内容详情内容详情内容详情
			</view>
		</view>
		<!--  场地预约-->
		<view class="mainpadding ffffff margin_top1">
			<view class="sanshier xiaohei fonweight">场地预约</view>
			<view class="flexbetween">
				<view class="ershiba xiaohei nofonweight margin_top2">场地预约</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
			<scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll">
				<view id="demo1" class="scroll-view-item_H uni-bg-red" v-for="item in 3">
					<view class="yubox margin_top2 margin_right3">
						<view class="ershiba xiaohei nofonweight">今天(07-03)</view>
						<view class="ershil xiaohui nofonweight margin_top1">最早08:00可订</view>
						<view class="flexcenter">
							<view class="xiaolvbtn margin_top2" @click="tzxzcc">预约</view>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
		<!-- 场地设施 -->
		<view class="mainpadding ffffff margin_top1">
			<view class="sanshier xiaohei fonweight">场地设施</view>
			<view class="margin_top1 xiaohui ershiba nofonweight">地板 灯光 吊灯 风扇 空调</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
				list1: [
					'https://cdn.uviewui.com/uview/swiper/swiper1.png',
					'https://cdn.uviewui.com/uview/swiper/swiper2.png',
					'https://cdn.uviewui.com/uview/swiper/swiper3.png',
				],
				show: false,
				fxshow: false,
			}
		},
		methods: {
			// 跳转选择场次
			tzxzcc() {
				uni.navigateTo({
					url: '/pages_homepage/xuanzechangci'
				})
			},
			upper: function(e) {
				console.log(e)
			},
			lower: function(e) {
				console.log(e)
			},
			scroll: function(e) {
				console.log(e)
				this.old.scrollTop = e.detail.scrollTop
			},
			goTop: function(e) {
				// 解决view层不同步的问题
				this.scrollTop = this.old.scrollTop
				this.$nextTick(function() {
					this.scrollTop = 0
				});
				uni.showToast({
					icon: "none",
					title: "纵向滚动 scrollTop 值已被修改为 0"
				})
			},
			close() {
				this.show = false
			},
			fxclose() {
				this.fxshow = false
			}
		}
	}
</script>

<style lang="scss" scoped>
	.xiaolvbtn {
		width: 112rpx;
		height: 56rpx;
		background: #1BA95B;
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		font-size: 26rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.yubox {
		background: #EFFFF6;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		padding: 24rpx 44rpx;
		border: 2rpx solid #1BA95B;
	}

	page {
		background-color: #F9F9F9;
	}

	.icowz {
		position: absolute;
		top: 30rpx;
		right: 30rpx;
	}

	.erwim {
		width: 128rpx;
		height: 128rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.erwmtu {
		width: 412rpx;
		height: 328rpx;
		border-radius: 8rpx;

		image {
			border-radius: 8rpx;
			width: 100%;
			height: 100%;
		}
	}

	.block {
		background: linear-gradient(180deg, #EFF7FF 0%, #D1E8FF 100%);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.guandys {
		position: absolute;
		right: 30rpx;
		top: 30rpx;
	}
</style>